<html>
 <head>
        <title>[var.TITLE]</title>
        <link href="[var.ROOT_CSS_DIR]/main.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
        <link href="[var.ROOT_CSS_DIR]/facet/style.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
        <script type="text/javascript" src="[var.ROOT_DIR]js/common.js"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/doiMenuDOM.js"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/functions.js"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsmenu.php"></script>
        <script type="text/javascript" src="[var.ROOT_DIR]js/jsmenu.cfg"></script>
 </head>
 <body bgcolor="FFFFFF" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
        <table border="0" cellspacing="0" cellpadding="0" width="100%" align="[var.POSITION]">
                <tr>
                        <td>[tbs_include.onshow;file=[var.HTMLHeader];getob;]</td>
                </tr>
                <tr>
                        <td>
                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                <tr>
                                        <td class="mainmenu2"><img src="images/spacer.gif" height="1" width="1"></td>
                                </tr>
                                <tr>
                                        <td style="background-color=whitesmoke" >
                                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                                <tr>
                                                  <td>
                                                    <script language="JavaScript" type="text/JavaScript">menu.Build();</script>
                                                  </td>
                                                  <td class="head-login">Login as [var.USERPROFILE_NAME] </td>
                                                </tr>
                                          </table>
                                        </td>
                                </tr>

                                <tr>
                                        <td class="mainmenu2"><img src="images/spacer.gif" height="1" width="1"></td>
                                </tr>
                        </table>
                        </td>
                </tr>
                <tr height="100%">
                        <td>
                        <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
                                <tr valign="top">
                                        <td width="100%">
                                                <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                                        <tr>
                                                                <td class="head-path"></td>
                                                                <td class="corner-date">[var.CORNER_DATE]</td>
                                                        </tr>
                                                </table>
                                                <table border="0" cellspacing="0" cellpadding="5" width="100%">
                                                        <tr>
                                                                <td class="FacetHeaderContent" align="left">.:[var.SubHeaderTitle]:. </td>
                                                        </tr>
                                                </table>
                                                <table border="0" cellspacing="0" cellpadding="5" width="100%">
                                                        <tr>
                                                                <td class="contentTitle">
                                                                Menu
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td class="content2">
                                                                <table cellspacing="2" cellpadding="0">
                                                                 <tr>
                                                                   <td>
                                                                     <input type="button" name="Action" value="Print to PDF" class="button" onClick="return SubmitTo();">
                                                                   </td>
                                                                   <td>
                                                                     <input type="button" name="Action" value="Export to CSV Excel" class="button" onClick="self.location.replace('[sys.script_name]?PageMode=Excel')">
                                                                   </td>
                                                                 </tr>
                                                                </table>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td class="content2">
                                                                        <table border="0" cellspacing="0" cellpadding="0">
                                                                        <form name='[var.HTMLGridList]'>
																			<tr>
																				<td class="fieldCaption" align="right">Year</td>
																				<td class="fieldCaption">:</td>
																				<td>
																					<select name="periodYear" class="input" >
																					  <option value="">-</option>
													                      			  <option value="[yearformblk.year]">[yearformblk.year;block=option]</option>
																					</select>
																				</td>
																			</tr>
																			<tr>
																				<td class="fieldCaption" align="right">Month</td>
																				<td class="fieldCaption">:</td>
																				<td>
																					<select name="periodMonth" class="input" >
																					  <option value="">-</option>
													                      			  <option value="[monthformblk.id]">[monthformblk.month;block=option]</option>
													                      			  <option value="AUDIT">AUDIT</option>
																					</select>
																				</td>
																			</tr>
																			<tr>
																				<td class="fieldCaption" align="right">Office</td>
																				<td class="fieldCaption">:</td>
																				<td>
																					<select name="office" class="input" >
																					  <option value="">-</option>
													                      			  <option value="[officeformblk.ktrasl]">[officeformblk.ktrasl]-[officeformblk.ktrnam;block=option]</option>
																					</select>
																				</td>
																			</tr>
																			<tr>
																				<td class="fieldCaption" align="right">COA</td>
																				<td class="fieldCaption">:</td>
																				<td>
																					<select name="fromCoa" class="input">
																					  <option value="">(All)</option>
													                      			  <option value="[coaformblk.skada]">[coaformblk.skada]-[coaformblk.namacc;block=option]</option>
																					</select>
																				</td>
																			</tr>
                                       </form>
                                       </table>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td >&nbsp;</td>
                                                        </tr>
                                                </table>
                                        </td>
                                </tr>
                        </table>

                        </td>
                </tr>
                <tr>
                        <td>
                        <table border="0" cellspacing="0" cellpadding="0" width="100%">
                                <tr>
                                        <td class="footer1"><img src="images/spacer.gif" height="1" width="1"></td>
                                </tr>
                                <!--tr>
                                        <td class="footer2">Prototype Test - Web Application</td>
                                </tr-->
                        </table>
                        </td>
                </tr>
         </table>
 </body>
</html>

<script>

function SubmitTo () {
	parameterize = '';
	if (CheckRequire()) {	  
          parameterize += '&y='+document.[var.HTMLGridList].periodYear.value;
          parameterize += '&m='+document.[var.HTMLGridList].periodMonth.value;
          parameterize += '&o='+document.[var.HTMLGridList].office.value;
          parameterize += '&f_c='+document.[var.HTMLGridList].fromCoa.value;

	  str_url = '[sys.script_name]?PageMode=PDF'+parameterize;
	  OpenPDF(str_url);
	  return true;
	} else {
	  return false;
	}
}


function CheckRequire() {
	year    = document.[var.HTMLGridList].periodYear.value;
	month   = document.[var.HTMLGridList].periodMonth.value;
	
	if ((year.length>0) && (month.length>0)) return true;
	else return false;
}
</script>
